<div class="updates-heading">
  <h3>{{i18n "admin.docker.update_title"}}</h3>
  {{#unless this.outdated}}
    <DButton
      disabled={{this.upgradeAllButtonDisabled}}
      id="upgrade-all"
      class="btn btn-primary"
      type="button"
      {{on "click" this.upgradeAllButton}}
    >
      {{#if this.allUpToDate}}
        {{i18n "admin.docker.all_up_to_date"}}
      {{else}}
        {{i18n "admin.docker.update_all"}}
      {{/if}}
    </DButton>
  {{/unless}}
</div>

{{#if this.outdated}}
  <h2>{{i18n "admin.docker.outdated_image_header"}}</h2>
  <p>{{i18n "admin.docker.outdated_image_info"}}</p>

  {{! prettier-ignore }}
  <pre>
    cd /var/discourse
    git pull
    ./launcher rebuild app
  </pre>
  <p>
    <a
      href="https://meta.discourse.org/t/how-do-i-update-my-docker-image-to-latest/23325"
    >
      {{i18n "admin.docker.outdated_image_link"}}
    </a>
  </p>
{{else}}

  <table class="d-admin-table" id="repos">
    <thead>
      <th>{{i18n "admin.docker.repo.name"}}</th>
      <th>{{i18n "admin.docker.repo.commit_hash"}}</th>
      <th>{{i18n "admin.docker.repo.last_updated"}}</th>
      <th>{{i18n "admin.docker.repo.latest_version"}}</th>
      <th>{{i18n "admin.docker.repo.status"}}</th>
    </thead>
    <tbody>
      {{#each this.model as |repo|}}
        <RepoStatus
          @repo={{repo}}
          @upgradingRepo={{repo.upgrading}}
          @managerRepo={{this.managerRepo}}
        />
      {{/each}}
    </tbody>
  </table>
{{/if}}